//
//@File    :	5.17_textin2.cpp
//@Time    :	2021/08/06 18:10:23
//@Auther  :	Sun Sheng
//@Contact :	970340843@qq.com
//@Desc    :	using cin.get(char)
//

#include <iostream>

using namespace std;
int main()
{
    char ch;
    int count = 0;

    cout<<"Enter charaters;enter # to quit:\n";
    cin.get(ch);
    while (ch!='#')
    {
        cout<<ch;
        ++count;
        cin.get(ch);
    }
    cout<<endl<<count<<" characters read\n";
    system("pause");
    return 0;
}